<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<logic:empty name="usuario">
	<logic:forward name="login" />
</logic:empty>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">			
	</head>
	
	<body>
		<div class="blocks" style="width: 95%;">
			<div class="block" style="width: 500px;">
  				<h3 class="title"><span>Resumen Producción Anual (kW/h)<a href='/temp/<bean:write name="nombre_fichero"/>' style="cursor: pointer; text-align: right; font-size: 10px; text-transform: none; padding-left: 60px;">Exportar a Excel</a></span></h3>
  				<div class="block-div"></div><div class="block-div-arrow"></div>  				
  			</div>
  			<div class="block" style="margin-left: 10px; cursor: default;">
  				<ul>
  				<logic:iterate id="parque" name="resumen_produccion">  				
					<logic:equal value="S" name="parque" property="propio">
						<li style="font-weight: bold;"><bean:write name="parque" property="nombre"/></li>												
						<logic:iterate id="tarificador" name="parque" property="tarificadores">						
							<span style="margin-left: 25px; font-size: 10px;">TARIFICADOR : <bean:write name="tarificador" property="nombre" /></span>
							<div style="margin-left: 30px;">
								<div style="width: 40px; float: left;">&nbsp;</div>
								<logic:iterate id="mes" name="meses">
									<div style="width: 80px; text-align: center; font-weight: bold; float: left;"><bean:write name="mes"/></div>
								</logic:iterate>									
								<br>
								<% int x = 0; %>		
								<logic:iterate id="lectura" name="tarificador" property="lecturas_tm1">								
									<bean:define id="indice" value="<%=String.valueOf(x) %>" />
									<logic:equal value="0" name="indice">
										<div style="width: 40px; text-align: center; font-weight: bold; float: left;"><bean:write name="lectura" property="periodo" format="yyyy"/></div>									
									</logic:equal>																
									<div title="Imp:<bean:write name='lectura' property='activa_importada' format='#,###.##'/> kW; Q1:<bean:write name='lectura' property='reactiva_q1' format='#,###.##'/> kW; Q2:<bean:write name='lectura' property='reactiva_q2' format='#,###.##'/> kW; Q3:<bean:write name='lectura' property='reactiva_q3' format='#,###.##'/> kW; Q4:<bean:write name='lectura' property='reactiva_q4' format='#,###.##'/> kW" style="width: 80px; text-align: center; float: left;" onmouseover="this.style.fontWeight = 'bold'; this.style.fontSize = '15px';" onmouseout="this.style.fontWeight = 'normal'; this.style.fontSize = '13px';"><bean:write name="lectura" property="activa_exportada" format="#,###.##"/></div>
									<% x++; %>																
									<logic:equal value="11" name="indice">
										<br>
										<% x = 0; %>
									</logic:equal>
								</logic:iterate>
							</div>
							<br>
						</logic:iterate>						
					</logic:equal>
		  		</logic:iterate>
		  		</ul>
	  		</div>
		</div>		
	</body>
</html>